package cn.z2huo.knowledge.concurrency.threadlocal.timeconsume;

import cn.hutool.core.thread.ThreadUtil;

import java.util.concurrent.TimeUnit;

/**
 * <p>
 *
 * @author z2huo
 */
class ServiceImpl {

    public void serviceMethod() {

        ThreadUtil.sleep(500, TimeUnit.MILLISECONDS);

        SpeedLog.logPoint("point-1 service method");

        daoMethod();

        rpcMethod();
    }

    public void daoMethod() {
        ThreadUtil.sleep(300, TimeUnit.MILLISECONDS);

        SpeedLog.logPoint("point-2 dao method");
    }

    public void rpcMethod() {
        ThreadUtil.sleep(100, TimeUnit.MILLISECONDS);

        SpeedLog.logPoint("point-3 rpc method");
    }

}
